Optimal. Leaf size=109 \[ -\frac {2 b \log (\sin (c+d x))}{a^3 d}-\frac {\left (a^2-b^2\right )^2}{a^2 b^3 d (a+b \sin (c+d x))}-\frac {\csc (c+d x)}{a^2 d}-\frac {2 \left (a^4-b^4\right ) \log (a+b \sin (c+d x))}{a^3 b^3 d}+\frac {\sin (c+d x)}{b^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2837, 12, 894} \[ -\frac {\left (a^2-b^2\right )^2}{a^2 b^3 d (a+b \sin (c+d x))}-\frac {2 \left (a^4-b^4\right ) \log (a+b \sin (c+d x))}{a^3 b^3 d}-\frac {2 b \log (\sin (c+d x))}{a^3 d}-\frac {\csc (c+d x)}{a^2 d}+\frac {\sin (c+d x)}{b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 894
Rule 2837
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b^2 \left (b^2-x^2\right )^2}{x^2 (a+x)^2} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{x^2 (a+x)^2} \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (1+\frac {b^4}{a^2 x^2}-\frac {2 b^4}{a^3 x}+\frac {\left (a^2-b^2\right )^2}{a^2 (a+x)^2}-\frac {2 \left (a^4-b^4\right )}{a^3 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=-\frac {\csc (c+d x)}{a^2 d}-\frac {2 b \log (\sin (c+d x))}{a^3 d}-\frac {2 \left (a^4-b^4\right ) \log (a+b \sin (c+d x))}{a^3 b^3 d}+\frac {\sin (c+d x)}{b^2 d}-\frac {\left (a^2-b^2\right )^2}{a^2 b^3 d (a+b \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.62, size = 95, normalized size = 0.87 \[ -\frac {2 \left (\frac {a}{b^3}-\frac {b}{a^3}\right ) \log (a+b \sin (c+d x))+\frac {2 b \log (\sin (c+d x))}{a^3}+\frac {\left (a^2-b^2\right )^2}{a^2 b^3 (a+b \sin (c+d x))}+\frac {\csc (c+d x)}{a^2}-\frac {\sin (c+d x)}{b^2}}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 214, normalized size = 1.96 \[ \frac {a^{4} b \cos \left (d x + c\right )^{2} - a^{4} b + a^{2} b^{3} + 2 \, {\left (a^{4} b - b^{5} - {\left (a^{4} b - b^{5}\right )} \cos \left (d x + c\right )^{2} + {\left (a^{5} - a b^{4}\right )} \sin \left (d x + c\right )\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - 2 \, {\left (b^{5} \cos \left (d x + c\right )^{2} - a b^{4} \sin \left (d x + c\right ) - b^{5}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + {\left (a^{3} b^{2} \cos \left (d x + c\right )^{2} + a^{5} - 3 \, a^{3} b^{2} + 2 \, a b^{4}\right )} \sin \left (d x + c\right )}{a^{3} b^{4} d \cos \left (d x + c\right )^{2} - a^{4} b^{3} d \sin \left (d x + c\right ) - a^{3} b^{4} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 131, normalized size = 1.20 \[ -\frac {\frac {2 \, b \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {\sin \left (d x + c\right )}{b^{2}} - \frac {a^{3} \sin \left (d x + c\right )^{2} + 2 \, a^{2} b \sin \left (d x + c\right ) - 2 \, b^{3} \sin \left (d x + c\right ) - a b^{2}}{{\left (b \sin \left (d x + c\right )^{2} + a \sin \left (d x + c\right )\right )} a^{2} b^{2}} + \frac {2 \, {\left (a^{4} - b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3} b^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.80, size = 151, normalized size = 1.39 \[ \frac {\sin \left (d x +c \right )}{b^{2} d}-\frac {2 a \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{3} d}+\frac {2 b \ln \left (a +b \sin \left (d x +c \right )\right )}{d \,a^{3}}-\frac {a^{2}}{d \,b^{3} \left (a +b \sin \left (d x +c \right )\right )}+\frac {2}{b d \left (a +b \sin \left (d x +c \right )\right )}-\frac {b}{d \,a^{2} \left (a +b \sin \left (d x +c \right )\right )}-\frac {1}{d \,a^{2} \sin \left (d x +c \right )}-\frac {2 b \ln \left (\sin \left (d x +c \right )\right )}{a^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 120, normalized size = 1.10 \[ -\frac {\frac {a b^{3} + {\left (a^{4} - 2 \, a^{2} b^{2} + 2 \, b^{4}\right )} \sin \left (d x + c\right )}{a^{2} b^{4} \sin \left (d x + c\right )^{2} + a^{3} b^{3} \sin \left (d x + c\right )} + \frac {2 \, b \log \left (\sin \left (d x + c\right )\right )}{a^{3}} - \frac {\sin \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{4} - b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3} b^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.10, size = 313, normalized size = 2.87 \[ \frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (4\,a^2-b^2\right )}{b}-2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-a+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (4\,a^4-5\,a^2\,b^2+2\,b^4\right )}{a\,b^2}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (8\,a^4-9\,a^2\,b^2+4\,b^4\right )}{a\,b^2}}{d\,\left (2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+4\,b\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,b\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}+\frac {2\,a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b^3\,d}-\frac {2\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {2\,\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (a^4-b^4\right )}{a^3\,b^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________